let BaseBean = require('@/common/BaseBean');
let comDriver = require('@/common/driver');

class Bean extends BaseBean {
    constructor(param = {}) {
        super(param);
    }

    async run(params) {
        await super.run(params);

        let deviceWidth = comDriver.getWidth();
        if (deviceWidth > 750) deviceWidth = 750;
        comDriver.app.rem = deviceWidth / 7.5;

        document.documentElement.style.fontSize = comDriver.app.rem + 'px';

        return params;
    }

}

module.exports = Bean;
